<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>管理收货地址</title>
    <link rel="stylesheet" href="./assets/mui/css/mui.min.css">
    <link rel="stylesheet" href="./assets/fontAwesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="./css/login.css">
    <script src="./assets/zepto/zepto.min.js"></script>
    <script src="./assets/mui/js/mui.min.js"></script>
    <script src="./assets/artTemplate/template-native.js"></script>
    <script src="./js/public.js"></script>
    <script src="./js/address.js"></script>
</head>

<body>
    <!-- 顶部部分 -->
    <header class="mui-bar mui-bar-nav myheader">
        <a href="javascript:history.go(-1)" class="mui-icon mui-icon-arrowleft mui-pull-left"></a>
        <h1 class="mui-title">管理收货地址</h1>
    </header>
    <!-- 内容部分 -->
    <div class="mui-content">

        <ul class="mui-table-view">
            <li class="mui-table-view-cell mui-media">
                <a href="add-address.html" class="addAddress">添加收货地址</a>
            </li>
            <!-- 滑动删除组件 -->
            <div id="addressBox"></div>
            <script type="text/template" id="tem-address">
                <% for(var i=0;i<data.length;i++){ %>
                    <li data-id="<%=data[i].id %>" class="mui-table-view-cell mui-transitioning">
                        <div class="mui-slider-right mui-disabled">
                            <!-- 不需要跳转的按钮可以将a改为span，因为a禁止跳转会影响js里点击按钮跳转事件 -->
                            <span class="mui-btn mui-btn-yellow" style="transform: translate(0px, 0px);" id="edit-btn">编辑</span>
                            <span class="mui-btn mui-btn-red" style="transform: translate(0px, 0px);" id="delete-btn">删除</span>
                        </div>
                        <div class="mui-slider-handle" style="transform: translate(0px, 0px);">
                            邮 编:
                            <%=data[i].postCode %> 收货人:
                                <%=data[i].recipients %>
                                    <p class='mui-ellipsis'>
                                        <%=data[i].address %>
                                            <%=data[i].addressDetail %>
                                    </p>
                        </div>
                    </li>
                    <% } %>
            </script>
        </ul>
    </div>
    <!-- 底部导航 -->
    <nav class="mui-bar mui-bar-tab footer">
        <a class="mui-tab-item" href="index.html">
            <span class="mui-icon mui-icon-home"></span>
            <span class="mui-tab-label">首页</span>
        </a>
        <a class="mui-tab-item" href="category.html">
            <span class="mui-icon mui-icon-bars"></span>
            <span class="mui-tab-label">分类</span>
        </a>
        <a class="mui-tab-item" href="cart.html">
            <i class="mui-icon fa fa-shopping-cart" aria-hidden="true"></i>
            <span class="mui-tab-label">购物车</span>
        </a>
        <a class="mui-tab-item mui-active" href="user.html">
            <span class="mui-icon mui-icon-person"></span>
            <span class="mui-tab-label">会员中心</span>
        </a>
    </nav>

</body>

</html>